@(id: Long, users : List[models.User])

@import helper._

@implicitFieldConstructor = @{ FieldConstructor(twitterBootstrapInput.render) }

@main("Todo list") {

	<header class="topbar">
		 <h1 class="fill" align="center">
		 	<a href="@routes.Application.index()">
				Plateforme de gestion de catalogue de produits
            </a>
         </h1>
    </header>
    	@if(flash.containsKey("success")){
    		<div align="center" class="alert-message success">
    			<strong>Done!</strong>@flash.get("error")
    		</div>
    	}else{
    		@if(flash.containsKey("error")){
	    		<div align="center" class="alert-message error">
	            	<strong>Done!</strong> @flash.get("error")
	        	</div>
	   		}
    	}
 
<p>
<h2>Liste des Users :</h2>
  #{list items:users, as:'user'}
    <div><label>[${user.id}] ${user.login}</label></div>
  #{/list}
</p>
 
<p>
#{form @Users.add(id)}
<h2>Add a new User :</h2>
<div>
  <label>Login :</label>
  <input type="text" name="login" />
</div>
 
<div>
  <label>Password :</label>
  <input type="text" name="password" />
</div>
<div>
  <input type="submit" value="Add" />
</div>
#{/form}
</p>

}